<template>
  <!-- 详情 -->
  <el-dialog title="绑卡记录详情" :visible.sync="dialogVisible" width="50%" append-to-body :close-on-click-modal="false" :before-close="closedialog">
    <el-descriptions :column="2"  border>
      <el-descriptions-item>
        <template slot="label">
          车辆编码
        </template>
        {{form.veCustomsNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          车牌号
        </template>
        {{form.vehicleNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          IC卡号
        </template>
        {{form.cardNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          电子车牌
        </template>
        {{form.rfid}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          绑定时间
        </template>
        {{form.bindTime}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          绑定状态
        </template>
        <dict-tag :options="dict.type.sgs_vehicle_rd_code" :value="form.bindStatus"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建人
        </template>
        {{form.createBy}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建时间
        </template>
        {{form.createTime}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          备注
        </template>
        {{form.remark}}
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer" style="text-align: center;">
      <el-button @click="closedialog">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import { getPreVehicleBindcardRecord } from "@/api/billsdecl/preVehicleBindcardRecord";
  export default {
    props: {
      dict: {}
    },
    data() {
      return {
        //显示详情
        dialogVisible:false,
        form: {
          id: null,
          veCustomsNo: null,
          vehicleNo: null,
          bindVehicleId: null,
          cardNo: null,
          rfid: null,
          bindTime: null,
          bindStatus: "0",
          declType: null,
          createBy: null,
          createTime: null,
          remark: null
        }
      }
    },
    methods: {
      open(row){
        this.dialogVisible = true;
        this.loadDetail(row);
      },
      closedialog(){
        this.dialogVisible = false
      },
      // 获取详情
      loadDetail(row) {
        getPreVehicleBindcardRecord(row.id).then((res) => {
          if (res.code == 200) {
            this.form = res.data;
          }
        });
      },
    }
  };
</script>

<style>

</style>
